package sample8;

import java.awt.Frame;
import java.awt.Menu;
import java.awt.MenuBar;
import java.awt.MenuItem;

public class MenuFrameShower {
	public static void main(String[] args) {
		Frame f = new Frame();
		f.setBounds(100, 100, 400, 300);
		MenuBar mb = new MenuBar();
		Menu file = new Menu("File");
		file.add(new MenuItem("New"));
		file.add(new MenuItem("Open"));
		file.add(new MenuItem("Save"));
		file.add(new MenuItem("Save As"));
		file.addSeparator();
		file.add(new MenuItem("Exit"));
		mb.add(file);
		Menu edit = new Menu("Edit");
		edit.add(new MenuItem("Undo"));
		edit.add(new MenuItem("Redo"));
		edit.addSeparator();
		edit.add(new MenuItem("Cut"));
		edit.add(new MenuItem("Copy"));
		edit.add(new MenuItem("Paste"));
		mb.add(edit);
		f.setMenuBar(mb);
		f.setVisible(true);
	}
}